| Conditions | 2 | 
| Total Lines | 19 | 
| Code Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | import { | 
            ||
| 29 | |||
| 30 |   @Put(':id') | 
            ||
| 31 | @Roles(UserRole.COOPERATOR, UserRole.EMPLOYEE)  | 
            ||
| 32 |   @ApiOperation({summary: 'Update customer'}) | 
            ||
| 33 |   public async index(@Param() dto: IdDTO, @Body() customerDto: CustomerDTO) { | 
            ||
| 34 |     try { | 
            ||
| 35 |       const { | 
            ||
| 36 |         address: {street, city, zipCode, country}, | 
            ||
| 37 | name  | 
            ||
| 38 | } = customerDto;  | 
            ||
| 39 |       const {id} = dto; | 
            ||
| 40 | |||
| 41 | await this.commandBus.execute(  | 
            ||
| 42 | new UpdateCustomerCommand(id, name, street, city, zipCode, country)  | 
            ||
| 43 | );  | 
            ||
| 44 | |||
| 45 |       return {id}; | 
            ||
| 46 |     } catch (e) { | 
            ||
| 47 | throw new BadRequestException(e.message);  | 
            ||
| 48 | }  | 
            ||
| 51 |